package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type AttachmentCategoryRequest struct {
	Pid uint `json:"pid" form:"pid"`

	Name string `json:"name" form:"name"`

	Dir string `json:"dir" form:"dir"`
}

func (r *AttachmentCategoryRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *AttachmentCategoryRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{
		"name": "required",
	}
}

func (r *AttachmentCategoryRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *AttachmentCategoryRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *AttachmentCategoryRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
